Skip to contentMethod: handle(VariableSymbol, PackageDescriptionFileParser, TempPackageRule)
      1: package symbols;
2: 
3: import parser.PackageDescriptionFileParser;
4: import parser.ParserException;
5: import parser.TempPackageRule;
6: import parser.states.packagestates.AbstractPackageParserState;
7: 
8: /**
9:  * Visitor for the Symbols. This visitor transmit a TempPackageRule in the handle-method.
10:  * 
11:  * @author Lisa Leitloff
12:  * 
13:  */
14: public class PackageDescriptionSymbolVisitorWithTempRule {
15:         /**
16:          * the exceptionMessage for the ParserException, which will be thrown.
17:          */
18:         private final String exceptionMessage;
19: 
20:         /**
21:          * constructor for the SymbolVisitorWithTempRule.
22:          * 
23:          * @param exceptionMessage
24:          *            for the ParserExceptuin, which will be thrown.
25:          */
26:         protected PackageDescriptionSymbolVisitorWithTempRule(final String exceptionMessage) {
27:                 super();
28:                 this.exceptionMessage = exceptionMessage;
29:         }
30: 
31:         /**
32:          * handles an object of the type commentSymbol.
33:          * 
34:          * @param commentSymbol
35:          *            is the type of the handled object.
36:          * @param parser
37:          *            is the parser.
38:          * @param tempPackageRule
39:          *            is the temporary Package Rule
40:          * @return the actual state of the parser.
41:          * @throws ParserException
42:          *             if the symbol is not expected.
43:          */
44:         protected AbstractPackageParserState handle(final CommentSymbol commentSymbol,
45:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
46:                         throws ParserException {
47:                 throw new ParserException(this.exceptionMessage);
48:         }
49: 
50:         /**
51:          * handles an object of the Type EndSymbol.
52:          * 
53:          * @param endSymbol
54:          *            is the type of the handled object.
55:          * @param parser
56:          *            is the parser.
57:          * @throws InterruptedException
58:          *             from the Buffer.
59:          * @param tempPackageRule
60:          *            is the temporary Package Rule
61:          * @return the actual state of the parser.
62:          * @throws ParserException
63:          *             if the symbol is not expected.
64:          */
65:         protected AbstractPackageParserState handle(final EndSymbol endSymbol,
66:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
67:                         throws InterruptedException, ParserException {
68:                 throw new ParserException(this.exceptionMessage);
69:         }
70: 
71:         /**
72:          * handles an object of the Type RowEndSymbol.
73:          * 
74:          * @param rowEndSymbol
75:          *            is the type of the handled object.
76:          * @param parser
77:          *            is the parser.
78:          * @param tempPackageRule
79:          *            is the temporary Package Rule
80:          * @throws InterruptedException
81:          *             from the buffer.
82:          * @return the actual state of the parser.
83:          * @throws ParserException
84:          *             if the symbol is not expected.
85:          */
86:         protected AbstractPackageParserState handle(final RowEndSymbol rowEndSymbol,
87:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
88:                         throws InterruptedException, ParserException {
89:                 throw new ParserException(this.exceptionMessage);
90:         }
91: 
92:         /**
93:          * handles an object of the Type VariableSymbol.
94:          * 
95:          * @param variableSymbol
96:          *            is the type of the handled object.
97:          * @param parser
98:          *            is the parser.
99:          * @param tempPackageRule
100:          *            is the temporary Package Rule
101:          * @return the actual state of the parser.
102:          * @throws ParserException
103:          *             if the symbol is not expected.
104:          */
105:         protected AbstractPackageParserState handle(final VariableSymbol variableSymbol,
106:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
107:                         throws ParserException {
108:                 throw new ParserException(this.exceptionMessage);
109:         }
110: 
111:         /**
112:          * handles an object of the Type ValueSymbol.
113:          * 
114:          * @param valueSymbol
115:          *            is the type of the handled object.
116:          * @param parser
117:          *            is the parser.
118:          * @param tempPackageRule
119:          *            is the temporary Package Rule
120:          * @return the actual state of the parser.
121:          * @throws ParserException
122:          *             if the symbol is not expected.
123:          */
124:         protected AbstractPackageParserState handle(final ValueSymbol valueSymbol,
125:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
126:                         throws ParserException {
127:                 throw new ParserException(this.exceptionMessage);
128:         }
129: 
130:         /**
131:          * handles an object of the Type PathSymbol.
132:          * 
133:          * @param pathSymbol
134:          *            is the type of the handled object.
135:          * @param parser
136:          *            is the parser.
137:          * @param tempPackageRule
138:          *            is the temporary Package Rule
139:          * @return the actual state of the parser.
140:          * @throws ParserException
141:          *             if the symbol is not expected.
142:          */
143:         protected AbstractPackageParserState handle(final PathSymbol pathSymbol,
144:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
145:                         throws ParserException {
146:                 throw new ParserException(this.exceptionMessage);
147:         }
148: 
149:         /**
150:          * handles an object of the Type OptionSymbol.
151:          * 
152:          * @param optionSymbol
153:          *            is the type of the handled object.
154:          * @param parser
155:          *            is the parser.
156:          * @param tempPackageRule
157:          *            is the temporary Package Rule
158:          * @return the actual state of the parser.
159:          * @throws ParserException
160:          *             if the symbol is not expected.
161:          */
162:         protected AbstractPackageParserState handle(final OptionSymbol optionSymbol,
163:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
164:                         throws ParserException {
165:                 throw new ParserException(this.exceptionMessage);
166:         }
167: }